package com.hdaccp.letting.controller;

import com.hdaccp.letting.bean.User;
import com.hdaccp.letting.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@Controller
@RequestMapping("/user")
public class UserController {
    @Resource
    private UserService userService ;
    @RequestMapping("/getUser")
    @ResponseBody
    public User getUser(int id, HttpServletRequest request){
        User user = userService.getUser(id) ;
        return user ;
    }
}
